home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 April / Disc 2 / PCUSER0402D2.iso / software / utils / files / wincron.exe / data1.cab / Sample_Scripts / load_ftp_service.tg < prev    next >
Encoding:
Text File  |  2001-10-20  |  998 b   |  38 lines

  1. ## load_ftp_service    
  2. # Load the FTP service described in the registry key:
  3. # Software\\Tomasello Software\\WinCron\\services\ftp"
  4. # This entry must have a key named "library" that has a value which is the name of the 
  5. #    DLL to load to implement the service.
  6. # Other optional keys are "module" and "path"
  7. {
  8.     -name load_ftp_service
  9.     -start    
  10.     -stop    
  11.  
  12.     # load the actual service library
  13.     -action -print Loading FTP Service...
  14.     -action -onerror load_fail
  15.     -action -load -service ftp
  16.  
  17.     # call the meta function to get the DLL version information
  18.     -action -onerror version_fail
  19.     -action -ftp FTP.VERSION
  20.     -action -print %FTP.VERSION%
  21. }
  22.  
  23. # load service failed
  24. {
  25.     -name load_fail
  26.     -action -print Loading the FTP service failed with error:
  27.     -action -print %TG.LAST_ERROR%
  28.     -action -return abort
  29. }
  30.  
  31. # get version failed
  32. {
  33.     -name version_fail
  34.     -action -print FTP Library did not implement the standard version call:
  35.     -action -print %TG.LAST_ERROR%
  36.     -action -return abort
  37. }
  38.